package com.itzhanshen.xxljob.demo;

import com.xxl.job.core.handler.annotation.XxlJob;
import org.springframework.stereotype.Component;

import java.util.Date;

@Component
public class XXLDemo01 {
    @XxlJob("test") // ==@XxlJob("demoJobHandler") : 该注解用来定义任务处理器, 并且设置该任务的别名
    public void test() {
        System.out.println(new Date() + "任务开始执行:" + Thread.currentThread().getName());
    }
}
